<style>
td.change-status{cursor:pointer;}
.change-status span:hover{background-color:yellow;}
</style>
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf"><?php echo $category['title']; ?></div>
                </div>
                <div class="widget-body am-fr">
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                
                            </div>
                        </div>
                    </div>
                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>赛事</th>
                                <th>主</th>
                                <th>比分</th>
                                <th>客</th>
                                <th>标签</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
                                <tr>
                                    <td class="am-text-middle"><?php echo $item['id']; ?></td>
                                    <td class="am-text-middle">
                                        <p class="item-title"><?php echo $item['match']; ?></p>
                                    </td>
                                    <td class="am-text-middle">
                                        <a href="<?php echo $item['home_logo']; ?>"
                                           title="点击查看大图" target="_blank">
                                            <?php echo $item['home']; ?>
                                            <img src="<?php echo $item['home_logo']; ?>"
                                                 width="30" height="30" alt="图片">
                                        </a>
                                    </td>
                                    <td class="am-text-middle"><?php echo $item['ho_num'].'-'.$item['gu_num']; ?></td>
                                    <td class="am-text-middle">
                                        <a href="<?php echo $item['guest_logo']; ?>"
                                           title="点击查看大图" target="_blank">
                                            <img src="<?php echo $item['guest_logo']; ?>"
                                                 width="30" height="30" alt="图片">
                                            <?php echo $item['guest']; ?>
                                        </a>
                                    </td>
                                    <td class="am-text-middle"><?php echo $item['tags']; ?></td>
                                    <td class="am-text-middle">
                                        <div class="tpl-table-black-operation">
                                            <a href="javascript:;" class="item-delete tpl-table-black-operation-del"
                                               data-id="<?php echo $item['id']; ?>">
                                                <i class="am-icon-trash"></i> 删除
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            <?php endforeach; else: ?>
                                <tr>
                                    <td colspan="9" class="am-text-center">暂无记录</td>
                                </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>    
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr"><?php echo $list->render(); ?> </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：<?php echo $list->total(); ?></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {

        // 删除元素
        var url = "<?php echo url('delete'); ?>";
        $('.item-delete').delete('id', url);


    });
</script>

